import Vue from 'vue'
import Router from 'vue-router'
import CommonView from '@/components/routerview';
import Login from '@/views/login';

// 子路由表
import org from './org';
import personnel from './persionnel';attendance
import attendance from './attendance';
import payroll from './payroll';
import socialsecurity from './socialsecurity';
import companySettings from './company-settings';

Vue.use(Router)

const routes = [
  {
    path: '/',
    component: CommonView,
    // redirect: "/personnel",
    redirect:"/login/"
  },
  {
    path: '/login',
    component: Login,
    // redirect: "/personnel",
    
  }
]

routes.push(personnel);
routes.push(org);
routes.push(attendance);
routes.push(payroll);
routes.push(socialsecurity);
routes.push(companySettings);

export default new Router({
  mode: 'hash',
  routes
})
